home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / menubarHotkeyMM.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.6 KB  |  132 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  17 April 1997
  22. // Author:         gf
  23. //
  24. //
  25. //  Procedure Name:
  26. //      menubarHotkeyMM
  27. //
  28. //  Description:
  29. //        This procedure sets up a hotkey-based
  30. //        marking menu for rapidly switching between
  31. //        menubar tabs.
  32. //
  33. //  Input Arguments:
  34. //
  35. //  Return Value:
  36. //      None.
  37. //
  38.  
  39.  
  40.  
  41. global proc syncHotboxMode (string $mode )
  42. {
  43.     // If hotbox is in "Show All" mode then ignore
  44.     if (`hotBox -q -a`)
  45.         return;
  46.  
  47.  
  48.     //    Update the working mode
  49.     //
  50.     switch( $mode ) {
  51.         case "Animation":    hotBox -ao; break;
  52.         case "Modeling":    hotBox -mo; break;
  53.         case "Rendering":    hotBox -ro; break;
  54.         case "Dynamics":    hotBox -do; break;
  55.         case "Cloth":        hotBox -clo; break;
  56.         case "Fur" :        hotBox -ro; break;
  57.         case "Live":        hotBox -lo; break;
  58.         case "Fluids":        hotBox -do; break;
  59.         default:            hotBox -ao; break;
  60.     }
  61.     
  62. }
  63.  
  64.  
  65.  
  66. global proc menubarHotkeyMM()
  67. //
  68. // Creates a marking menu that allows the user
  69. // to select from the menubar tabs. It reuses
  70. // the name tempMM for the name of the menu, to
  71. // ensure that there's only one of these at
  72. // any one time.
  73. //
  74. {
  75.     if( `popupMenu -exists tempMM` )
  76.     {
  77.         deleteUI tempMM;
  78.     }
  79.  
  80.     popupMenu -mm 1 -b 1 -p viewPanes tempMM;
  81.         menuItem -rp "N" -l "Modeling" 
  82.             -c "setMenuMode Modeling; syncHotboxMode Modeling" 
  83.             -enableCommandRepeat false;
  84.         menuItem -rp "E" -l "Animation" 
  85.             -c "setMenuMode Animation; syncHotboxMode Animation"
  86.             -enableCommandRepeat false;
  87.         menuItem -rp "S" -l "Dynamics" 
  88.             -c "setMenuMode Dynamics; syncHotboxMode Dynamics" 
  89.             -enableCommandRepeat false;
  90.         menuItem -rp "W" -l "Rendering" 
  91.             -c "setMenuMode Rendering; syncHotboxMode Rendering" 
  92.             -enableCommandRepeat false;
  93.             
  94.         //    These items are only available in Maya Unlimited.
  95.         //
  96.         //    Note that there really should be a license check explicitly
  97.         //    for cloth/fur/live. Currently, there isn't so that is why the test
  98.         //    below is on fluids, since fluids == Unlimited for 5.0
  99.         //
  100.         if( fluidEditLicenseFound() ) {
  101.  
  102.             if( `pluginInfo -q -l "CpClothPlugin"` )
  103.             {
  104.                 menuItem -rp "NE" -l "Cloth" 
  105.                     -c "setMenuMode Cloth; syncHotboxMode Cloth" 
  106.                     -enableCommandRepeat false;
  107.             }
  108.  
  109.             if( `pluginInfo -q -l "Fur"` )
  110.             {
  111.                 menuItem -rp "NW" -l "Fur" 
  112.                     -c "setMenuMode Rendering; syncHotboxMode Fur" 
  113.                     -enableCommandRepeat false;
  114.             }
  115.  
  116.             if( `pluginInfo -q -l "mayalive"` )
  117.             {
  118.                 menuItem -rp "SW" -l "Live" 
  119.                     -c "setMenuMode Live; syncHotboxMode Live" 
  120.                     -enableCommandRepeat false;
  121.             }
  122.  
  123.             menuItem -rp "SE" -l "Fluids" 
  124.                 -c "setMenuMode Dynamics; syncHotboxMode Fluids" 
  125.                 -enableCommandRepeat false;
  126.         }
  127.  
  128.             
  129.     setParent -m ..;
  130. }
  131.  
  132.